//
//  Trivia.h
//  MathMasterMain
//
//  Created by Jimmy Hahm on 10-03-27.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Questions.h"
#import "QuestionXMLParser.h"


@interface Trivia : UIViewController {
	
	int QID;
	NSString *QType;
	IBOutlet UILabel *Question;
	IBOutlet UIButton *Option1;
	IBOutlet UIButton *Option2;
	IBOutlet UIButton *Option3;
	IBOutlet UIButton *Option4;
	NSString *Answer;
	NSURL *IMGLocation; 
	IBOutlet UIImageView *Image;
	IBOutlet UIImageView *Correction;
	int score;
	BOOL questionAskedArray[12];
	BOOL allQuestionsUsed;
	IBOutlet UIButton *nextQuestionButton;
	IBOutlet UIButton *scoreButton;
	int lastScore;
}

@property (nonatomic) int QID;
@property (retain,nonatomic) NSString *QType;
@property (retain,nonatomic) IBOutlet UILabel *Question;
@property (retain,nonatomic) IBOutlet UIButton *Option1;
@property (retain,nonatomic) IBOutlet UIButton *Option2;
@property (retain,nonatomic) IBOutlet UIButton *Option3;
@property (retain,nonatomic) IBOutlet UIButton *Option4;
@property (retain,nonatomic) NSString *Answer;
@property (retain,nonatomic) NSURL *IMGLocation; 
@property (retain,nonatomic) IBOutlet UIImageView *Image;
@property (retain,nonatomic) IBOutlet UIImageView *Correction;
@property (retain,nonatomic) IBOutlet UIButton *nextQuestionButton;
@property (retain,nonatomic) IBOutlet UIButton *scoreButton;

-(IBAction)optionPressed:(id)sender;
-(IBAction)closeTrivia:(id)sender;
-(BOOL)connectedToWeb;
-(IBAction)loadQuestionPressed:(id)sender;
-(void)loadQuestion;
-(int)returnScore;
@end
